Component({
    externalClasses: ['i-class'],
    data : {
        value : false,
        //large small default
        size : 'default',
        // is or not disable
        disable : false,
        // hidden inut name
        name : ''
    },
    didMount(){
      this.setData({
        value: this.props.value
      })
    },
    methods : {
        toggle(){
            if( this.data.disable.value ) return;
            const value = this.props.value ? false : true;
            const id = this.props.id
            this.setData({
              value: value
            })
            const e = {
              id: id,
              value: value
            }
            this.props.onChange(e)
            // this.triggerEvent('change',{
            //     value : value
            // })
        }
    }
});
